package com.cy.bfzcommons.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cy.bfzcommons.pojo.Category;
import org.apache.ibatis.annotations.Select;

public interface CategoryMapper extends BaseMapper<Category> {

    @Select("select name from category where category_id = #{categoryId}")
    String selectNameById(Integer categoryId);

    @Select("select parent from category where category_id = #{categoryId}")
    Integer VueSelectNameById(Integer categoryId);

    @Select("select category_id from category where name=#{name}")
    Integer selectIdByName(String name);
}
